#include "BCGPColorBar.h"
#include "BCGPSVGImage.h"
#include "MFCApplication2.h"
class CMyColorBar : public CBCGPColorBar{

	virtual BOOL OnDrawPaletteColorBox(CDC* pDC, const CRect rectColor, COLORREF color, BOOL /*bIsAutomatic*/, BOOL bIsSelected) {
		
		if (m_Star.IsEmpty() && !m_Star.Load(IDR_SVG1)) {

			return FALSE;
		}

		CBCGPSVGImage star = m_Star;

		star.AdaptColors(RGB(255, 255, 255), color);
		star.AdaptColors(RGB(0, 0, 0), bIsSelected ? RGB(255, 192, 87) : globalData.clrBarShadow);

		star.DoDraw(pDC, rectColor);
		return TRUE;
	}

	CBCGPSVGImage m_Star;
};